// 公共样式写在外面
.card {
  .title {
    display: flex;
    justify-content: space-between;
    align-items: center;  // 垂直居中
    border-bottom: 1px solid var(--card_bottom_color);
    padding: 20px 20px 10px 20px;
    border-radius: 5px 5px 0 0;
    background-color: var(--card_bg);

    h2 {
      font-size: 20px;
    }

    > div {
      a {
        font-size: 14px;
      }
    }
  }

  .body.init {
    border-radius: 0 0 5px 5px;
    padding: 10px 20px 20px 20px;
    background-color: var(--card_bg);
  }
}

#app {
  main {
    .main {
      > div {
        width: 100%;
        display: flex;
        justify-content: space-between;

        .left {
          width: 69%;
          background-color: transparent;
          padding: 0;

          .all_article {
            .title {
              padding: 20px 20px 10px 20px;
              border-radius: 5px 5px 0 0;
              background-color: var(--card_bg);
              border-bottom: 1px var(--card_bottom_color) solid;

              h2 {
                font-size: 18px;
                color: var(--card_color);
              }
            }

            .body {

              > ul {
                width: 100%;
                > li {
                  width: 100%;
                  display: flex;
                  background-color: var(--card_bg);
                  margin-bottom: 20px;
                  border-radius: 5px;

                  &:first-child {
                    border-radius: 0 0 5px 5px;
                    .left {
                      padding: 10px 10px 20px 20px;
                    }
                    .right {
                      padding: 10px 20px 20px 10px;
                    }
                  }

                  .left {
                    width: 30%;
                    padding: 20px 10px 20px 20px;
                    box-sizing: border-box;

                    > div {
                      width: 100%;
                      height: 110px;
                      overflow: hidden;
                      border-radius: 5px;

                      img {
                        width: 100%;
                        transition: all 0.3s;
                        &:hover {
                          transform: scale(1.1);  // 缩放效果
                        }
                      }
                    }

                  }
                  .right {
                    width: 70%;
                    padding: 20px 20px 20px 10px;
                    position: relative;  // 相对定位

                    > h2 {
                      font-size: 16px;
                      margin-bottom: 5px;

                      a {
                        color: var(--a_color);
                      }
                    }

                    // 多行截断
                    p {
                      color: #808595;
                      display: -webkit-box;
                      -webkit-box-orient: vertical;
                      -webkit-line-clamp: 2;
                      overflow: hidden;
                      text-overflow: ellipsis;
                      margin-bottom: 15px;
                    }

                    .article_info {
                      font-size: 14px;
                      color: #555;
                      > span {
                        margin-right: 10px;

                        i {
                          margin-right: 5px;
                        }
                      }
                    }

                    > a {
                      width: 100px;
                      height: 30px;
                      position: absolute;
                      right: 20px;
                      bottom: 15px;

                      background-color: var(--a_btn_color);
                      color: white;
                      display: flex;
                      justify-content: center;
                      align-items: center;
                      border: 0;
                      border-radius: 5px;
                      font-size: 14px;
                    }
                  }
                }
              }
            }
          }

        }

        .right {
          width: 30%;
          > div {
            margin-bottom: 20px;
          }

          .about {
            display: flex;
            flex-direction: column;
            align-items: center;
            background-color: var(--card_bg);
            border-radius: 5px;
            padding: 20px;
            > div {
              width: 110px;
              height: 110px;
              border-radius: 50%;
              overflow: hidden;
              img {
                width: 100%;
              }
            }

            h2 {
              margin: 10px 0;
              font-size: 18px;
              font-family: "Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
            }

            p {
              font-size: 14px;
              font-family: "Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;

              margin: 0 20px 20px 20px;
            }

            button {
              //消除button的默认样式
              margin: 0;
              padding: 0;
              //background-color: transparent;
              border: 1px solid transparent;  //自定义边框
              outline: none;    //消除默认点击蓝色边框效果

              width: 90%;
              height: 35px;
              font-family: "Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
              font-size: 16px;
              font-weight: 600;
              color: white;
              border-radius: 5px;
              background-color: #F56C6C;

              transition: all 0.3s;

              &:hover {
                cursor: pointer;
                color: white;
                background-color: #409EFF;
              }
            }
          }

          .tags > .body {
            position: relative;
            ul {
              display: flex;
              flex-wrap: wrap;  // 弹性换行
              margin-top: 10px;

              // 关键帧 ( 动画 )
              @keyframes move_box{
                0% {
                  left: 0;
                  top: 0;
                }
                25% {
                  left: calc(100% - 20px);
                  top: 0;
                }
                50% {
                  left: calc(100% - 20px);
                  top: calc(100% - 20px);
                }
                75% {
                  left: 0;
                  top: calc(100% - 20px);
                }
                100% {
                  left: 0;
                  top: 0;
                }
              }

              &::before {
                position: absolute;
                top: 0;
                left: 0;
                display: block;
                width: 20px;
                height: 20px;
                content: '';
                background-color: #ff9800;

                // 使用动画
                -webkit-animation-name : move_box;
                animation: move_box;
                -webkit-animation-duration: 5s;
                animation-duration: 5s;
                -webkit-animation-iteration-count: infinite;
                animation-iteration-count: infinite;
              }

              li {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 33.33%;
                height: 40px;
                box-sizing: border-box;
                // 选中 奇数行
                &:nth-child(6n+1),&:nth-child(6n+2),&:nth-child(6n+3) {
                  background-color: var(--tag_color_dan);
                }
                &:nth-child(3n+1),&:nth-child(3n+2) {
                  border-right: 1px solid var(--tag_color_shuang);
                }

              }
            }
          }

        }

      }
    }
  }
}